package org.NooLab.glue.subscription;

import java.io.Serializable;
import java.util.Arrays;

import org.NooLab.compare.DataDomainGlobals;
import org.NooLab.glue.subscription.context.Context;
import org.NooLab.glue.subscription.context.ContextIntf;



public class FutureProperties implements DataDomainGlobals, Serializable{
  
	private static final long serialVersionUID = -1935783209640114198L;
	
	transient public final static int _SIMPLESET = _DD_SIMPLESET ; // item set
	transient public final static int _VECTOR    = _DD_VECTOR ; // feature vector, or discrete series
	
	transient public final static int _CONTEXT   = _DD_CONTEXT ; // context
	
	transient public final static int _STRING    = _DD_STRING ; // string
	transient public final static int _FREETEXT  = _DD_FREETEXT ; // free text 
	transient public final static int _IMAGE     = _DD_IMAGE ; // image
	
	int type = 0 ;  
	
	String key = "";
	String name = "" ;
	String[] values = new String[0];
	String[] exclvalues = new String[0];
	
	double[] dataValues = new double[0];
	
	String fullText = "";
	byte[] imageBytes = null ;
	
	double minimalMatch = 0.0;
	double minimalProfileSimilarity = 0.0;
	
	
	transient ContextIntf context=null;
	String encodedContext ="";
	
	String processorGUID = "" ; 

	
	// ------------------------------------------------------------------------
	public FutureProperties(){
		
	}
	// ------------------------------------------------------------------------
	
	
	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public String[] getValues() {
		return values;
	}

	public void setValues(String[] values) {
		this.values = values;
	}
	public void setValues(String valuesStr) {
		this.values = valuesStr.split(";");
	}


	public double[] getDataValues() {
		return dataValues;
	}



	public String getFullText() {
		return fullText;
	}



	public byte[] getImageBytes() {
		return imageBytes;
	}



	public void setDataValues(double[] dataValues) {
		this.dataValues = dataValues;
	}



	public void setFullText(String fullText) {
		this.fullText = fullText;
	}



	public void setImageBytes(byte[] imageBytes) {
		this.imageBytes = imageBytes;
	}



	public String[] getExclvalues() {
		return exclvalues;
	}

	public void setExclvalues(String[] exclvalues) {
		this.exclvalues = exclvalues;
	}
	public void setExclvalues(String exclvaluesStr) {
		this.exclvalues = exclvaluesStr.split(";") ;
	}


	public double getNumValue( int kind){
		double v=0.0;
		
		if (kind == 1){
			v = minimalMatch;
		}
		return v;
	}

	public double getMinimalMatch() {
		return minimalMatch;
	}



	public void setMinimalMatch(double minimalMatch) {
		this.minimalMatch = minimalMatch;
	}



	public double getMinimalProfileSimilarity() {
		return minimalProfileSimilarity;
	}


	public void setMinimalProfileSimilarity(double minimalProfileSimilarity) {
		this.minimalProfileSimilarity = minimalProfileSimilarity;
	}


	public int getType() {
		return type;
	}



	public void setType(int type) {
		this.type = type;
	}



	public ContextIntf getContext() {
		return context;
	}



	public void setContext(ContextIntf context) {
		// TODO: needs to be a copy !!!
		context = new Context(context);
		this.context = context;
	}



	public String getEncodedContext() {
		return encodedContext;
	}



	public void setEncodedContext(String encodedContext) {
		this.encodedContext = encodedContext;
	}



	public String getProcessorGUID() {
		return processorGUID;
	}



	public void setProcessorGUID(String processorGUID) {
		this.processorGUID = processorGUID;
	}
	
	
	
}
